home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / TCL1 / GRAPH_FO / (GRAPH / GRAPH_HE / GRNODE.H < prev    next >
Text File  |  1991-02-15  |  1KB  |  50 lines

  1. /******************************************************************************
  2.     GrNode.h
  3.         Graph methods in Object C.
  4.         This implements the GrNode class, base for GrVertex and GrEdge.
  5.  
  6.     SUPERCLASS = CObject
  7.  
  8.     Copyright ⌐ 1991 Maarten Meijer. All rights reserved.
  9.         CIS 100016,1764; FidoNet 2:512/114
  10. *******************************************************************************/
  11.  
  12. #define    _H_GrNode
  13.  
  14. /* externs */
  15. #include <CObject.h>
  16.  
  17. /* class definition */
  18. struct GrNode : CObject {
  19.     RgnHandle    hotRegion;
  20.     Boolean        selected;
  21.  
  22.     void        IGraphNode(void);
  23.     CObject *    Copy();
  24.  
  25.     /* Tracking methods */
  26.     short        Track(void);
  27.  
  28.     /* Drawing methods */
  29.     void        _Draw(void);    /* draw outline */
  30.     void        Draw(void);        /* draw contents */
  31.  
  32.     /* Selection methods */
  33.     void        Select(void);
  34.     void        Deselect(void);
  35.     void        ToggleNode(Boolean redraw);
  36.     Boolean        Selected(void);
  37.  
  38.     /* Location methods */
  39.     Boolean        Incident(GrNode *which);
  40.     void        SetRegion(void);
  41.     Boolean        PtInNode(Point where);
  42.  
  43.     /* Updating methods */
  44.     void        GetRect(Rect *rect);
  45.     Boolean        NodeInRect(Rect *r);
  46.  
  47.     /* Freeing methods */
  48.     void        Dispose(void);        /* OVERRIDE */
  49.     };
  50.